<!DOCTYPE html>
<html>
<!--<![endif]-->

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1" />
</head>

<body>

	<div role="main" id="main" class="modal show" aria-hidden="true" aria-labelledby="myModalLabel" tabindex="-1" style="overflow: scroll;">
		<div class="modal-dialog" style="text-align: center;">

			<div class="modal-content">
				<div class="modal-header">
					<h1 class="text-center text-primary">随手拍上传</h1>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" action="/YGJ/Sub" enctype="multipart/form-data" method="post" role="form" id="myform">
						<div class="form-group" style="margin-bottom: 30px;">
							<div class="col-sm-12">
								<textarea id="context" name="context" class="form-control"
									rows="5" cols="49" placeholder="请描述您的随手拍的内容......"></textarea>
							</div>
						</div>
						<div class="form-group" id="fileUploadDiv">
							<div class="col-sm-12 col-xs-12 col-lg-12 col-md-12">
							<!-- class="file-loading" -->
								<input type="file"  id="filePhotos"
									name="filePhotos" multiple="multiple" size="53">
								<input type="hidden"  id="code"
									name="code" value="">
								<input type="hidden"  id="bid"
									name="bid" value="">
								<input type="hidden"  id="subUserPhone"
									name="subUserPhone" value="">
								<input type="hidden"  id="employeeId"
									name="employeeId" value="">
								<input type="hidden"  id="compoundsId"
									name="compoundsId" value="">
							</div>
						</div>
					</form>
					<div class="form-group" style="padding:15px; text-align: center;">
						<button id="submit" class="btn btn-primary btn-lg btn-block" onclick="sub()">提交</button>
					</div>
				</div>

			</div>
		</div>

	</div>


	<script>
		window.jQuery
				|| document
						.write('<script src="../../jslib/easyui/jquery-1.11.3.min.js"><\/script>')
	</script>
	
	<script type="text/javascript">
		function clearForm() {
			$("#myform").find("input,textarea").each(function(){
			    this.value = this.value.replace(/\&/g,"%26");//也可以清空数据this.value ="";
			 });
		}
		
		function sub() {
			var href = window.location.href;
			var paramsArr = href.split("?")[1].split("&");
			for (var i = 0; i < paramsArr.length; i++) {
				var paramArr = paramsArr[i].split("=");
				if ("code" == paramArr[0]) {
					var code = paramArr[1];
				}
				if ("bid" == paramArr[0]) {
					var bid = paramArr[1];
				}
				if ("compoundsId" == paramArr[0]) {
					var compoundsId = paramArr[1];
				}
				if ("subUserPhone" == paramArr[0]) {
					var subUserPhone = paramArr[1];
				}
				if ("employeeId" == paramArr[0]) {
					var employeeId = paramArr[1];
				}
			}
			
			$("#code").val(code);
			$("#bid").val(bid);
			$("#subUserPhone").val(subUserPhone);
			$("#employeeId").val(employeeId);
			$("#compoundsId").val(compoundsId);
			$("#myform").submit();
		}
		
		
	</script>
</body>

</html>